local thbattle__meidixin_shenjingzhidu = fk.CreateSkill {

  name = "thbattle__meidixin_shenjingzhidu",

  tags = {  },

}



thbattle__meidixin_shenjingzhidu:addEffect(fk.EventPhaseProceeding, {
  prompt = "#thbattle__meidixin_shenjingzhidu",
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(thbattle__meidixin_shenjingzhidu.name) and target.phase == Player.Start and
        #table.filter(player:getCardIds("he"), function(cid)
          return Fk:getCardById(cid).color == Card.Black
        end) > 0
  end,
  on_cost = function(self, event, target, player, data)
    local room = player.room
    if room:askForSkillInvoke(player, thbattle__meidixin_shenjingzhidu.name) then
      return #room:askForDiscard(player, 1, 1, true, thbattle__meidixin_shenjingzhidu.name, true, ".|.|spade,club",
        "#thbattle__meidixin_shenjingzhidu-discard:" .. target.id) > 0
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:loseHp(target, 1, thbattle__meidixin_shenjingzhidu.name)
    THB_Utility.addStatusMark(target, "@@hezui")
  end
})

return thbattle__meidixin_shenjingzhidu